if job.file.fileName = null	
	M291 R"Attention!" P"This macro is meant to be used only during the printing process. Manually extrude and retract the filament when not printing" T46
else
	M300 S1111 P333										; beep
	M25													; pause the print
	M291 R"Filament Change" P"Please wait for the temperature to reach the target" 
	T R1 		 										; select previous tool
	M116 S3												; wait for hotend temperatures to stabilise
	M291 S2 R"Unload filament" P"Hotend will now retract 100mm. Pull out the rest of the filament by hand. Press OK to start the retraction"
	M83													; relative extruder moves
	G1 E-100 F300 										; retract 100mm of filament
	G4 P0												; wait for the moves to finish       
	M300 S1111 P222										; beep 
	M291 S2 R"Load filament" P"Load filament into the filament sensor and feed it all the way into the extruder. Press OK once completed"
	M300 S1222 P222										; beep
	M291 S0 P"Extruding - Please wait" 			
	G1 E58 F900 	; Feed 58mm of filament at 15mm/s
		while true
		G1 E15 F200	; feed another 15mm at 3mm/sec
		G4 P0		; Wait for moves to complete
		; check if more is needed
		M291 S3 P"Click OK to purge more filament" R"Continue extruding" T0
	G1 E-2 F360   										; retract 2mm of filament
	G4 P0												; wait for the moves to finish 
	M300 S1111 P333										; beep
	M291 R"Attention!" P"It is recommended to turn off the heaters if the pause is expected to last a long time" T46